<% admin_breadcrumb(link_to plural_resource_name(Spree::Product), spree.admin_products_path) %>
<% admin_breadcrumb(link_to @product.name, spree.admin_product_path(@product)) %>

<% content_for :tabs do %>
  <nav>
    <ul class="tabs" data-hook="admin_product_tabs">
      <%= content_tag :li, :class => ('active' if current == 'Product Details') do %>
        <%= link_to Spree.t(:product_details), spree.edit_admin_product_url(@product) %>
      <% end if can?(:admin, Spree::Product) %>
      <%= content_tag :li, :class => ('active' if current == 'Images') do %>
        <%= link_to Spree.t(:images), spree.admin_product_images_url(@product) %>
      <% end if can?(:admin, Spree::Image) %>
      <%= content_tag :li, :class => ('active' if current == 'Variants') do %>
        <%= link_to plural_resource_name(Spree::Variant), spree.admin_product_variants_url(@product) %>
      <% end if can?(:admin, Spree::Variant) %>
      <%= content_tag :li, :class => ('active' if current == 'Prices') do %>
        <%= link_to plural_resource_name(Spree::Price), spree.admin_product_prices_url(@product) %>
      <% end if can?(:admin, Spree::Price) %>
      <%= content_tag :li, :class => ('active' if current == 'Product Properties') do %>
        <%= link_to plural_resource_name(Spree::ProductProperty), spree.admin_product_product_properties_url(@product) %>
      <% end if can?(:admin, Spree::ProductProperty) %>
      <%= content_tag :li, :class => ('active' if current == 'Stock Management') do %>
        <%= link_to Spree.t(:stock_management), spree.admin_product_stock_url(@product) %>
      <% end if can?(:admin, Spree::StockItem) %>
    </ul>
  </nav>
<% end %>
